package com.ddyx.rest.user;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ddyx.service.user.UEmployeService;
import com.ddyx.util.RequestForm;
import com.ddyx.util.ResponseForm;

@Controller
@RequestMapping("/uemploye")
public class UEmployeController {
	
	@Resource
	UEmployeService uEmployeService;
	
	@ResponseBody
	@RequestMapping(value="/addEmploye",method = RequestMethod.POST)
	public ResponseForm addCompany(@RequestBody RequestForm param) {
		
		return uEmployeService.addEmploye(param);
	}
	
	@ResponseBody
	@RequestMapping(value="/listEmploye",method = RequestMethod.POST)
	public ResponseForm listEmploye(@RequestBody RequestForm param) {
		
		return uEmployeService.listEmploye(param);
	}
	
	@ResponseBody
	@RequestMapping(value="/updateEmploye",method = RequestMethod.POST)
	public ResponseForm updateEmploye(@RequestBody RequestForm param) {
		
		return uEmployeService.updateEmploye(param);
	}
	
	
	@ResponseBody
	@RequestMapping(value="/checkEmploye",method = RequestMethod.POST)
	public ResponseForm checkEmploye(@RequestBody RequestForm param) {
		
		return uEmployeService.checkEmploye(param);
	}
	
	//登录
	@ResponseBody
	@RequestMapping(value = "/login", method = RequestMethod.POST)
	public ResponseForm login(@RequestBody RequestForm param) {
		return uEmployeService.login(param);
	}
	
	@ResponseBody
	@RequestMapping(value="/getEmployeById",method = RequestMethod.POST)
	public ResponseForm getEmployeById(@RequestBody RequestForm param) {
		
		return uEmployeService.getEmployeById(param);
	}
	
}
